﻿@namespace BulmaRazor.Components
@inherits BulmaComponentBase

<div @attributes="Attributes" class="@classes">
    @ChildContent
</div>

@code {
    string classes => CssBuilder.Default("panel-block")
  .AddClassFromAttributes(Attributes)
        .AddClass(Color.Value, Color.Value)
        .AddClass("is-active",IsActive)
  .Build();

    /// <summary>
    /// 颜色
    /// </summary>
    [Parameter]
    public Color Color { get; set; } = Color.Default;

    /// <summary>
    /// 是否激活
    /// </summary>
    [Parameter]
    public bool IsActive { get; set; }

    /// <summary>
    /// 子内容
    /// </summary>
    [Parameter]
    public RenderFragment ChildContent { get; set; }
}
